package com.kendless.essayreflex;

import lombok.Data;

import java.lang.reflect.Field;

public class FieldTest {

    public static void main(String[] args) throws NoSuchFieldException {

        Emp emp = new Emp();
        System.out.println(emp.toString());
        Class a = emp.getClass();

        Field[] declaredFields = a.getDeclaredFields();
        for (Field declaredField : declaredFields) {
            String name = declaredField.getName();
            System.out.println("name = " + name);
        }


    }

}
